<template>
    <div id="app">
      <el-form :model="user" label-width="100px">

        <el-form-item label="姓名" prop="name">
          <el-input v-model="user.uname"></el-input>
        </el-form-item>
        <el-form-item label="性别">
          <el-select v-model="user.gender" placeholder="请选择">
          <el-option
            label="男" value="0">
          </el-option>
            <el-option
              label="女" value="1">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="身份证号" prop="">
          <el-input v-model="user.idNo"></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click.prevent="test">保存</el-button>
        </el-form-item>
      </el-form>
    </div>
</template>

<script>
    export default {
      data(){
        return {
          user:{},
        }
      },
      created() {

      },
      methods:{
        test(){

            this.$confirm("是否确认提交","保存提示").then(()=>{
              this.axios.post("/user/add",this.user).then((resp)=>{
                  this.$message.success("保存成功！");
                  this.$router.push("/owner/OwnerList")
                });
            });

        },

      }
    }
</script>


<style scoped>

</style>
